{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Populating the interactive namespace from numpy and matplotlib\n"
     ]
    }
   ],
   "source": [
    "%pylab inline\n",
    "import matplotlib.pyplot as plt\n",
    "import tensorflow as tf\n",
    "import numpy as np\n",
    "import numpy.random as rng\n",
    "import pandas_datareader.data as web\n",
    "import numpy as np\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "# we modify this data organizing slightly to get two symbols\n",
    "def get_prices(symbol):\n",
    "    start, end = '2007-05-02', '2016-04-11'\n",
    "    data = web.DataReader(symbol, 'google', start, end)\n",
    "    data=pd.DataFrame(data)\n",
    "    prices=data['Close']\n",
    "    prices=prices.astype(float)\n",
    "    return prices\n",
    "\n",
    "def get_returns(prices):\n",
    "        return ((prices-prices.shift(-1))/prices)[:-1]\n",
    "    \n",
    "def get_data(list):\n",
    "    l = []\n",
    "    for symbol in list:\n",
    "        rets = get_returns(get_prices(symbol))\n",
    "        l.append(rets)\n",
    "    return np.array(l).T\n",
    "\n",
    "def sort_data(rets):\n",
    "    ins = []\n",
    "    outs = []\n",
    "    for i in range(len(rets)-100):\n",
    "        ins.append(rets[i:i+100].tolist())\n",
    "        outs.append(rets[i+100])\n",
    "    return np.array(ins), np.array(outs)\n",
    "        \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "symbol_list = ['C', 'GS']\n",
    "rets = get_data(symbol_list)\n",
    "ins, outs = sort_data(rets)\n",
    "ins = ins.transpose([0,2,1]).reshape([-1, len(symbol_list) * 100])\n",
    "div = int(.8 * ins.shape[0])\n",
    "train_ins, train_outs = ins[:div], outs[:div]\n",
    "test_ins, test_outs = ins[div:], outs[div:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "sess = tf.InteractiveSession()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "# once again I only make slight modifications\n",
    "\n",
    "# define placeholders \n",
    "x = tf.placeholder(tf.float32, [None, len(symbol_list) * 100])\n",
    "y_ = tf.placeholder(tf.float32, [None, len(symbol_list)])\n",
    "\n",
    "# define trainable variables\n",
    "W = tf.Variable(tf.random_normal([len(symbol_list) * 100, len(symbol_list)]))\n",
    "b = tf.Variable(tf.random_normal([len(symbol_list)]))\n",
    "\n",
    "# we define our model: y = W*x + b\n",
    "y = tf.matmul(x, W) + b\n",
    "\n",
    "#MSE:\n",
    "cost = tf.reduce_sum(tf.pow(y-y_, 2))/(2*1000)\n",
    "optimizer = tf.train.GradientDescentOptimizer(0.5).minimize(cost)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch: 1000 cost= 0.072743751\n",
      "Epoch: 2000 cost= 0.050064877\n",
      "Epoch: 3000 cost= 0.043570619\n",
      "Epoch: 4000 cost= 0.041413590\n",
      "Epoch: 5000 cost= 0.040621527\n",
      "Epoch: 6000 cost= 0.040309947\n",
      "Epoch: 7000 cost= 0.040181138\n",
      "Epoch: 8000 cost= 0.040125798\n",
      "Epoch: 9000 cost= 0.040101122\n",
      "Epoch: 10000 cost= 0.040089916\n",
      "Epoch: 11000 cost= 0.040084537\n",
      "Epoch: 12000 cost= 0.040081933\n",
      "Epoch: 13000 cost= 0.040080719\n",
      "Epoch: 14000 cost= 0.040080082\n",
      "Epoch: 15000 cost= 0.040079705\n",
      "Epoch: 16000 cost= 0.040079582\n",
      "Epoch: 17000 cost= 0.040079467\n",
      "Epoch: 18000 cost= 0.040079460\n",
      "Epoch: 19000 cost= 0.040079404\n",
      "Epoch: 20000 cost= 0.040079389\n"
     ]
    }
   ],
   "source": [
    "# initialize variables to random values\n",
    "init = tf.global_variables_initializer()\n",
    "sess.run(init)\n",
    "# run optimizer on entire training data set many times\n",
    "for epoch in range(20000):\n",
    "    sess.run(optimizer, feed_dict={x: train_ins, y_: train_outs})#.reshape(1,-1).T})\n",
    "    # every 1000 iterations record progress\n",
    "    if (epoch+1)%1000== 0:\n",
    "        c = sess.run(cost, feed_dict={x: train_ins, y_: train_outs})#.reshape(1,-1).T})\n",
    "        print(\"Epoch:\", '%04d' % (epoch+1), \"cost=\", \"{:.9f}\".format(c))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x11553bf98>]"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEDCAYAAAAyZm/jAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl81PWdP/DXO5PJQRJCICEg96UCKqIRrfU+ELFV29qK\n7W5t1y5rV9vt9dvVdauuba09tu1qbS3rsh5tPdpdW9qioFbrgViCglwCIaIQIAnhyJ253r8/vt/v\n5DuTmcyROb4z83o+Hnlk5vP9fifvGYb3fOZziqqCiIgKR1G2AyAiosxi4iciKjBM/EREBYaJn4io\nwDDxExEVGCZ+IqIC49jELyIrRaRNRLbGce6PRWST+bNLRI5lIkYiolwkTh3HLyIXAOgG8JiqnpLA\ndV8CsFBV/y5twRER5TDH1vhV9RUAR+xlIjJLRJ4TkY0i8qqInBzh0hsAPJGRIImIclBxtgNI0AoA\nN6vqbhE5G8DPAFxiHRSRaQBmAPhzluIjInK8nEn8IlIJ4FwAvxERq7g07LRlAH6rqv5MxkZElEty\nJvHDaJY6pqqnD3POMgC3ZCgeIqKc5Ng2/nCq2gngPRH5JACIYYF13GzvrwHwRpZCJCLKCY5N/CLy\n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ZyHmJhht4NZ7+SHz3E+Y75VNAN4C8FHb4zTASLh7APwU5moBGYo3\n4fdApvJIpHjN8kcA3Bx2bspfXy7ZQERUYPKlqYeIiOLExE9EVGCY+ImICgwTPxFRgWHiJyIqMEz8\nREQFhomfiKjA/H9uXhL5L77sSAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x111e957f0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#train results\n",
    "predict = y\n",
    "p = sess.run(predict, feed_dict={x: train_ins})\n",
    "position = 2*((p>0)-.5)\n",
    "returns= position * train_outs\n",
    "daily_returns = sum(returns,1)\n",
    "plot(np.cumprod(daily_returns+1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x1157e8fd0>]"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8lNXZ+P/PNZNlsu8kgSSEJSyRTYgIKCqiFdzwUWvF\n/VGxi9atttXH1sdaf61dHlttrS36pWhbxbUVFUVFcWMNgkiAQEgCJBCy73tyfn/MZJhAQgaYZJjJ\n9X698vK+z31m5sqtXnNy7rOIMQallFL+xeLtAJRSSnmeJnellPJDmtyVUsoPaXJXSik/pMldKaX8\nkCZ3pZTyQ5rclVLKD2lyV0opP6TJXSml/FCAtz44Pj7epKene+vjlVLKJ23atKncGJPQVz2vJff0\n9HSys7O99fFKKeWTRGSvO/W0W0YppfyQJnellPJDmtyVUsoP9ZncRWSJiJSKyLZerouIPC0ieSKy\nVUSmej5MpZRSx8OdlvtSYN4xrs8HMhw/dwDPnnxYSimlTkafyd0Y8xlQeYwqC4AXjd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ADF6A3twI+MMZnADOBOx38bem+gBTjfGDMZmALME5EZwG+A\nPxhjRgNVwG2O+rcBVY7yPzjq+bN7gB0u5/5xX4wxPvMDzARWupw/BDzk7bi8cB/SgW0u57lAsuM4\nGch1HP8NWNhTPX//Ad4CLtR7c9R9CQW+As7EPjknwFHu/H8L+37JMx3HAY564u3Y++l+pGD/0j8f\neAcQf7kvPtVyB4YB+13Oixxlg12iMeag47gESHQcD8r75fhz+XRgPXpvAGfXwxagFPgQ2ANUG2Pa\nHVVcf3/nvXFcrwHiBjbiAfNH4CdAp+M8Dj+5L76W3FUfjL1ZMWiHQIlIOPAGcK8xptb12mC+N8aY\nDmPMFOwt1enAOC+H5HUicilQaozZ5O1Y+oOvJfdiINXlPMVRNtgdEpFkAMc/Sx3lg+p+iUgg9sT+\nL2PMm45ivTcujDHVwCfYuxuiRSTAccn193feG8f1KKBigEMdCGcBl4tIIbAMe9fMU/jJffG15L4R\nyHA8zQ4CrgWWezmmU8Fy4GbH8c3Y+5u7ym9yjAyZAdS4dFH4FRER4P8BO4wxT7pc0nsjkiAi0Y7j\nEOzPInZgT/JXO6odeW+67tnVwMeOv3r8ijHmIWNMijEmHXsu+dgYcz3+cl+83el/Ag9ALgZ2Ye8z\nfNjb8Xjh938ZOAi0Ye8PvA17v98qYDfwERDrqCvYRxftAb4Bsrwdfz/el7Oxd7lsBbY4fi7We2MA\nJgGbHfdmG/CIo3wksAHIA14Dgh3lNsd5nuP6SG//DgNwj84D3vGn+6IzVJVSyg/5WreMUkopN2hy\nV0opP6TJXSml/JAmd6WU8kOa3JVSyg9pcldKKT+kyV0ppfyQJnellPJD/z/BeKiKqitR3wAAAABJ\nRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1062e56a0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#test results\n",
    "predict = y\n",
    "p = sess.run(predict, feed_dict={x: test_ins})\n",
    "position = 2*((p>0)-.5)\n",
    "returns= position * test_outs\n",
    "daily_returns = sum(returns,1)\n",
    "plot(np.cumprod(daily_returns+1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 1
}
